import 'package:blurrycontainer/blurrycontainer.dart';
import 'package:flutter/material.dart';

class JzxBlurView extends StatelessWidget {
  const JzxBlurView({
    super.key,
    this.child,
    this.height,
    this.width,
    this.radius,
    this.borderRadius,
    this.padding,
    this.backgroundColor,
    this.blur,
  });

  final Widget? child;
  final double? height;
  final double? width;
  final double? radius;
  final BorderRadius? borderRadius;
  final double? blur;
  final Color? backgroundColor;
  final EdgeInsets? padding;

  @override
  Widget build(BuildContext context) {
    return BlurryContainer(
      width: width,
      height: height,
      padding: padding ?? EdgeInsets.zero,
      borderRadius: borderRadius ?? BorderRadius.circular(radius ?? 0),
      color: backgroundColor ?? Colors.black.withOpacity(0.6),
      blur: blur ?? 20,
      child: child ?? const SizedBox.shrink(),
    );
  }
}
